/* Firefox userChrome.css tweaks ********************************************************/
/* Github: https://github.com/aris-t2/customcssforfx ************************************/
/****************************************************************************************/


/* remove star button animation (devs what the f... is this nonsense?) */
#urlbar #star-button,
#urlbar #star-button-box,
#urlbar #star-button-animatable-box {
  background: unset !important;
  box-shadow: unset !important;
  list-style-image: unset !important;
}
#star-button[preloadanimations] + #star-button-animatable-box > #star-button-animatable-image,
#star-button-box[animationsenabled] > #star-button[starred][animate] + #star-button-animatable-box > #star-button-animatable-image,
#star-button-box[animationsenabled] > #star-button[starred][animate] + #star-button-animatable-box,
#star-button-box[animationsenabled] > #star-button[starred][animate],
#star-button-box[animationsenabled] {
  background: unset !important;
  box-shadow: unset !important;
  animation-name: unset !important;
  animation-iteration-count: unset !important;
  animation-timing-function: unset !important;
  animation-duration: 1ms !important;
  fill: #ffd100 !important;
}

/* unset default filters (+ override filters set in icons_colorized.css) */
#urlbar #star-button[starred],
#urlbar #star-button-animatable-box[starred]:is(:hover,:hover:active),
#urlbar #star-button[preloadanimations][animate][starred]:is(:hover,:hover:active),
#urlbar #star-button-box[open] #star-button[starred],
#urlbar #star-button[starred]:is(:hover,:hover:active) {
  filter: unset !important;
}

/* grey non-bookmarked star (+ override filters set in icons_colorized.css) */
#urlbar #star-button:not([starred]),
#urlbar #star-button-box[open] #star-button:not([starred]),
#urlbar #star-button:not([starred]):is(:hover,:hover:active) {
  filter: grayscale(1.0) brightness(1.15) !important;
}

/* hover/open filters */
#urlbar #star-button-box[open],
#urlbar #star-button-box:is(:hover,:hover:active){
  filter: brightness(1.15) contrast(100%) !important;
}

/* yellow star button */
#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .ac-type-icon[type=bookmark],
.urlbarView-row[type=bookmark] > .urlbarView-row-inner > .urlbarView-type-icon,
#urlbar #star-button {
  list-style-image: url("chrome://browser/skin/bookmark.svg") !important;
  -moz-context-properties: fill !important;
  filter: unset !important;
  fill: #ffd100 !important;
}

/* yellow star button on favicon (megabar) */
.urlbarView .urlbarView-row[type=bookmark] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-type-icon {
  color: #ffd100 !important;
  fill: #ffd100 !important;
}
